package com.jkoss.wine.product.entity;

import java.io.Serializable;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.activerecord.Model;


/**
 * 商品
 * 
 * @Author nihao
 * @Version 1.0, 2019-08-12
 * @See
 * @Since com.jkoss.wine.product.entity
 * @Description: TODO
 */
public class Product extends Model<Product> {

    private static final long serialVersionUID = 1L;

    /**
     * 商品id
     */
    @TableId("product_id")
    private String productId;
    /**
     * 父级id
     */
    @TableField("parent_id")
    private String parentId;
    /**
     * 商品类型id
     */
    @TableField("product_type_id")
    private String productTypeId;
    /**
     * 店铺id
     */
    @TableField("shop_id")
    private String shopId;
    /**
     * 商品名称
     */
    @TableField("product_name")
    private String productName;
    /**
     * 店铺图片URL
     */
    @TableField("shop_asset_url")
    private String shopAssetUrl;
    /**
     * 统一运费价格
     */
    @TableField("freight_price")
    private Integer freightPrice;
    /**
     * 统一运费模板id
     */
    @TableField("freight_template_id")
    private String freightTemplateId;
    /**
     * 自定义属性 (存放json)
     */
    @TableField("custom_properties")
    private String customProperties;
    /**
     * 添加时间
     */
    @TableField("add_time")
    private Date addTime;
    /**
     * 操作人
     */
    @TableField("operator")
    private String operator;
    /**
     * 状态 0正常 1下架 2库存不足
     */
    @TableField("state")
    private Integer state;
    /**
     * 是否删除 0否1是
     */
    @TableField("del")
    private Integer del;


    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getProductTypeId() {
        return productTypeId;
    }

    public void setProductTypeId(String productTypeId) {
        this.productTypeId = productTypeId;
    }

    public String getShopId() {
        return shopId;
    }

    public void setShopId(String shopId) {
        this.shopId = shopId;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getShopAssetUrl() {
        return shopAssetUrl;
    }

    public void setShopAssetUrl(String shopAssetUrl) {
        this.shopAssetUrl = shopAssetUrl;
    }

    public Integer getFreightPrice() {
        return freightPrice;
    }

    public void setFreightPrice(Integer freightPrice) {
        this.freightPrice = freightPrice;
    }

    public String getFreightTemplateId() {
        return freightTemplateId;
    }

    public void setFreightTemplateId(String freightTemplateId) {
        this.freightTemplateId = freightTemplateId;
    }

    public String getCustomProperties() {
        return customProperties;
    }

    public void setCustomProperties(String customProperties) {
        this.customProperties = customProperties;
    }

    public Date getAddTime() {
        return addTime;
    }

    public void setAddTime(Date addTime) {
        this.addTime = addTime;
    }

    public String getOperator() {
        return operator;
    }

    public void setOperator(String operator) {
        this.operator = operator;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Integer getDel() {
        return del;
    }

    public void setDel(Integer del) {
        this.del = del;
    }

    @Override
    protected Serializable pkVal() {
        return this.productId;
    }

    @Override
    public String toString() {
        return "Product{" +
        ", productId=" + productId +
        ", parentId=" + parentId +
        ", productTypeId=" + productTypeId +
        ", shopId=" + shopId +
        ", productName=" + productName +
        ", shopAssetUrl=" + shopAssetUrl +
        ", freightPrice=" + freightPrice +
        ", freightTemplateId=" + freightTemplateId +
        ", customProperties=" + customProperties +
        ", addTime=" + addTime +
        ", operator=" + operator +
        ", state=" + state +
        ", del=" + del +
        "}";
    }
}
